import { HttpStatus } from "@nestjs/common"
import { ApiExtraModels } from "@nestjs/swagger"

@ApiExtraModels(ErrorRes)
export class ErrorRes implements Record<string, any>{
  
  error : string

  message: any

  statusCode: HttpStatus

  path: string

  timestamp: string

  /**
   *
   */
  constructor(message : any, statusCode: HttpStatus, path ?: string) {
    this.message = message
    this.statusCode = statusCode
    this.path = '你的 **接口** 请求路径'
    this.timestamp = new Date().toISOString()
    this.error = '一些错误信息'
  }
}

export class ErroMessage {
  error : string

  message: any

  statusCode: HttpStatus
}


